﻿@model DataModel.Models.LessonRequest

@{
    ViewBag.Title = "EditLesson";
    Layout = "~/Views/Shared/_Layout.cshtml";
    Layout = "";
    
}

@using (Ajax.BeginForm("EditLessonInline", "Schedule", new AjaxOptions { HttpMethod = "POST", OnFailure = "UpdateLesson()" }))
    {

        @Html.ValidationSummary(true)
        <div class="se-lesson" id="@Model.Lessonid">
            <div class="se-cell">
                @Html.HiddenFor(model => model.Lessonid)

                <input type="submit" value="Save" class="btn se-submit"/>
                <input type="button" value="Abort" class="btn se-abort"/>
            </div>
    
            <div class="se-cell">
                @*            @Html.LabelFor(model => model.weekday)*@
                @Html.EditorFor(model => model.Weekday)
                @Html.ValidationMessageFor(model => model.Weekday)
            </div>

            <div class="se-cell">
                @*            @Html.LabelFor(model => model.beginTime)*@
                @Html.EditorFor(model => model.BeginTime)
                @Html.ValidationMessageFor(model => model.BeginTime)
            </div>

            <div class="se-cell">
                @*            @Html.LabelFor(model => model.endTime)*@
                @Html.EditorFor(model => model.EndTime)
                @Html.ValidationMessageFor(model => model.EndTime)
            </div>

            <div class="se-cell">
                @*            @Html.LabelFor(model => model.subjectid)*@
                @Html.EditorFor(model => model.Subjectid)
                @Html.ValidationMessageFor(model => model.Subjectid)
            </div>

            <div class="se-cell">
                @*            @Html.LabelFor(model => model.professorid)*@
                @Html.EditorFor(model => model.Professorid)
                @Html.ValidationMessageFor(model => model.Professorid)
            </div>

            <div class="se-cell">
                @*            @Html.LabelFor(model => model.auditoryid)*@
                @Html.EditorFor(model => model.Auditoryid)
                @Html.ValidationMessageFor(model => model.Auditoryid)
            </div>



            <div class="se-cell">
                @*            @Html.LabelFor(model => model.lessonypeid)*@
                @Html.EditorFor(model => model.Lessonypeid)
                @Html.ValidationMessageFor(model => model.Lessonypeid)
            </div>


            <div class="se-cell">
                @*            @Html.LabelFor(model => model.periodicity)*@
                @Html.EditorFor(model => model.periodicity)
                @Html.ValidationMessageFor(model => model.periodicity)
            </div>
    
            <div class="se-cell se-periodicity-mask-edit">
                @Html.EditorFor(model => model.Periodicitymask)
                @Html.ValidationMessageFor(model => model.Periodicitymask)
            </div>

            <div class="se-cell">
                @*            @Html.LabelFor(model => model.begindate)*@
                @Html.EditorFor(model => model.Begindate)
                @Html.ValidationMessageFor(model => model.Begindate)
            </div>

            <div class="se-cell">
                @*            @Html.LabelFor(model => model.enddate)*@
                @Html.EditorFor(model => model.Enddate)
                @Html.ValidationMessageFor(model => model.Enddate)
            </div>

            <div class="se-cell">
                @*            @Html.LabelFor(model => model.semester)*@
                @Html.EditorFor(model => model.Semester)
                @Html.ValidationMessageFor(model => model.Semester)
            </div>

        </div>
    }